<template>
    <div class="child">
        <h3>钱数:{{ modelValue }}</h3>
        <h3>pageNo:{{ pageNo }}</h3>
        <h3>pageSize:{{ pageSize }}</h3>
        <button @click="handler">点击父组件的所有数据+1</button>
    </div>
</template>
  
<script setup lang="ts">
let props = defineProps(["modelValue", "pageNo", "pageSize"]);
let $emit = defineEmits(['update:modelValue', "update:pageNo", "update:pageSize"]);  //事件名是固定的，不能随便写
const handler = () => {
    $emit('update:modelValue', props.modelValue + 1);
    $emit('update:pageNo', 10086);  //将 pageNo 更新成10086
    $emit('update:pageSize', props.pageSize + 1);
}
</script>

<style scoped>
.child {
    width: 600px;
    height: 300px;
    background: skyblue;
}
</style>